/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package contest.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Admin
 */
public class AuthorizePage {

    Map<String, ArrayList<String>> value;

    public void add(String key, String arr) {

        if (this.value == null) {
            this.value = new HashMap<String, ArrayList<String>>();

        }
        if (this.value.get(key) == null) {
            this.value.put(key, new ArrayList<String>());
        }
        ArrayList<String> list = this.value.get(key);
        list.add(arr.trim());

    }

    public String[] get(String key) {
        if (this.value != null && this.value.get(key) != null) {
            return (String[]) this.value.get(key).toArray();
        }
        return null;
    }
}
